package com.iotechn.unimall.app.api.card;


import com.iotechn.unimall.core.annotation.HttpMethod;
import com.iotechn.unimall.core.annotation.HttpOpenApi;
import com.iotechn.unimall.core.annotation.HttpParam;
import com.iotechn.unimall.core.annotation.HttpParamType;
import com.iotechn.unimall.core.annotation.param.NotNull;
import com.iotechn.unimall.core.annotation.param.TextFormat;
import com.iotechn.unimall.core.exception.ServiceException;
import com.iotechn.unimall.data.domain.CardOrderDO;
import com.iotechn.unimall.data.domain.UserCardDO;
import com.iotechn.unimall.data.domain.UserDO;
import com.iotechn.unimall.data.dto.UserCardDTO;
import com.iotechn.unimall.data.dto.UserDTO;
import com.iotechn.unimall.data.dto.userCard.CardOrderInfoDTO;
import com.iotechn.unimall.data.dto.userCard.CardOrderRequestDTO;
import com.iotechn.unimall.data.dto.userCard.UserCardOrderDTO;
import com.iotechn.unimall.data.model.Page;

import java.util.List;

@HttpOpenApi(group = "userCard", description = "门店用户")
public interface UserCardService {

    @HttpMethod(description = "我的卡列表")
    public Page<UserCardDTO> userCardList(
            @HttpParam(name = "cardNo", type = HttpParamType.COMMON, description = "卡号") String cardNo,
            @HttpParam(name = "pageNo", type = HttpParamType.COMMON, description = "页码") Integer pageNo,
            @HttpParam(name = "limit", type = HttpParamType.COMMON, description = "条数") Integer limit,
            @NotNull @HttpParam(name = "userId", type = HttpParamType.USER_ID, description = "管理员ID") Long userId) throws ServiceException;


    @HttpMethod(description = "卡激活绑定")
    public Boolean cardBindUser(
            @NotNull @HttpParam(name = "cardNo", type = HttpParamType.COMMON, description = "卡号") String cardNo,
            @NotNull @HttpParam(name = "cardSecret", type = HttpParamType.COMMON, description = "卡密") String cardSecret,
            @NotNull @HttpParam(name = "phone", type = HttpParamType.COMMON, description = "手机号") String phone,
            @NotNull @HttpParam(name = "userId", type = HttpParamType.USER_ID, description = "门店收银员id") Long userId
    )  throws ServiceException;
}
